﻿<%@ Page Title="TransactionSearchResults" Language="C#" MasterPageFile="~/Admin/Membership.master" AutoEventWireup="true"
    CodeFile="TransactionSearchResults.aspx.cs" Inherits="Admin_TransactionSearchResults" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Import Namespace="ASPDotNetSamples" %>
<%@ Import Namespace="com.paypal.soap.api" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

  <%--  <script  type="text/javascript">
        function open_win(url_add) {

            var embeddedFrame = document.getElementById('<%=embeddedFrame.ClientID %>');
            embeddedFrame.src = url_add;
//            alert(embeddedFrame);
//       window.open(url_add, 'welcome', 'width=700,height=400,menubar=no,status=no,location=yes,toolbar=yes,scrollbars=yes'); 
   
   
   }
    </script>
--%>
    <table align="center">
        <tr>
            <td colspan="2">
                <center>
                    <b><font face="Verdana" color="black" size="2">Transaction Search Results</font></b></center>
            </td>
        </tr>
        <tr>
            <td>
                <asp:PlaceHolder ID="ResultsHeaderPlaceHolder" runat="server" Visible="<%#ResultsHeaderPlaceHolderVisible%>">
                    Results 1 -
                    <asp:Literal ID="ResultsCountLiteral" runat="server" Text="<%#ResultsCountLiteralText%>">
                    </asp:Literal></asp:PlaceHolder>
            </td>
        </tr>
        <tr>
            <th>
            </th>
            <th>
                Transaction ID
            </th>
            <th>
                Time
            </th>
            <th>
                Status
            </th>
            <th>
                Payer Name
            </th>
            <th>
                Gross Amount
            </th>
        </tr>
        <asp:Repeater ID="ResponseRepeater" runat="server" DataSource='<%#PayPalResponse.PaymentTransactions%>'>
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:Literal runat="server" ID="CountLiteral" Text='<%#Container.ItemIndex%>'>
                        </asp:Literal>
                    </td>
                    <td>
                        <a runat="server" id="TransactionDetailsLink0" href='<%#"TransactionDetails.aspx?" + Constants.TRANSACTIONID_PARAM + "=" + ((PaymentTransactionSearchResultType)Container.DataItem).TransactionID%>'  >
                            <asp:Literal runat="server" ID="TransactionIDLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).TransactionID%>'></asp:Literal></a>
                       <%-- <a href="javascript:void(0)" onclick="open_win('<%#"TransactionDetails.aspx?" + Constants.TRANSACTIONID_PARAM + "=" + ((PaymentTransactionSearchResultType)Container.DataItem).TransactionID%>')">Welcome message</A>

                        <asp:LinkButton ID="TID" runat="server" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).TransactionID%>'
                            OnClick="TransactionID_Click" />--%>
                    </td>
                    <td>
                        <asp:Literal runat="server" ID="TimestampLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).Timestamp%>'></asp:Literal>
                    </td>
                    <td>
                        <asp:Literal runat="server" ID="StatusLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).Status%>'></asp:Literal>
                    </td>
                    <td>
                        <asp:Literal runat="server" ID="PayerDisplayNameLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).PayerDisplayName%>'></asp:Literal>
                    </td>
                    <td>
                        <asp:Literal runat="server" ID="GrossAmountCurrencyLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).GrossAmount.currencyID%>'></asp:Literal><asp:Literal
                            runat="server" ID="GrossAmountValueLiteral" Text='<%#((PaymentTransactionSearchResultType)Container.DataItem).GrossAmount.Value%>'></asp:Literal>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <%--<telerik:RadGrid runat="server" ID="AddressDetails" ShowFooter="true" AllowSorting="true"
        EnableLinqExpressions="false" DataSourceID="'<%#PayPalResponse.PaymentTransactions%>'" >
        <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="False" 
             HierarchyLoadMode="ServerOnDemand" >
            <Columns>
               <telerik:GridTemplateColumn HeaderText="Transaction ID">
                    <ItemTemplate>
                        <asp:LinkButton  ID="lblNAme" runat="server" Text='<%#"TransactionDetails.aspx?" + Constants.TRANSACTIONID_PARAM + "=" + ((PaymentTransactionSearchResultType)Container.DataItem).TransactionID%>'/>
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <%--<telerik:GridBoundColumn HeaderText="Time" DataField="Address2">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn HeaderText="Status" DataField="City">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Payer Name" HeaderText="State">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gross Amount" HeaderText="ZipCode">
                </telerik:GridBoundColumn>
             
             
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>--%>
   
    <asp:PlaceHolder ID="NoMatchPlaceHolder" runat="server" Visible="<%#NoMatchPlaceHolderVisible%>">
        <h1>
            Your search did not match any transactions!</h1>
    </asp:PlaceHolder>
<%--     <iframe name="iframe1" id="embeddedFrame" width="700" height="400%"  runat="server" />--%>
</asp:Content>
